﻿@model WmWebSystem.Models.Project

@{
    ViewBag.Title = "编辑";
    Layout = "~/Views/Shared/_Layout_manage.cshtml";
}

<script src="@Url.Content("~/Scripts/BasicJs/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/BasicJs/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="contentcontainer">
    <div class="headings">
        <h2>项目编辑</h2>
    </div>
    <div class="contentbox">
        @using (Html.BeginForm("DoEdit", "Project", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.ProjectId)
            <table>
               <tbody>
                  <tr>
                    <th>项目名称</th>
                    <td>
                        @Html.TextBoxFor(model => model.ProjectName, new { @class = "box" })
                    </td>
                  </tr>
                  <tr>
                    <th>项目简介</th>
                    <td>
                        @Html.TextAreaFor(model => model.Content)
                    </td>
                  </tr>
                  <tr>
                    <th>项目类型</th>
                    <td>
                        @Enum.GetName(typeof(WmWebSystem.Models.Enum.ProjectType),Convert.ToInt32(Model.Type))
                        @{
                             List<SelectListItem> selectList = new List<SelectListItem>();
                             selectList.Add(new SelectListItem { Text = "--请选择--", Value = "0", Selected = true });
                             foreach (object e in Enum.GetValues(typeof(WmWebSystem.Models.Enum.ProjectType)))
                             {
                                 selectList.Add(new SelectListItem { Text = Enum.GetName(typeof(WmWebSystem.Models.Enum.ProjectType), e), Value = ((int)e).ToString() });
                             }
                             @Html.DropDownList("Ptype", selectList);
                         }
                    </td>
                  </tr>
                  <tr>
                    <th>集资金额</th>
                    <td>
                        @Html.TextBoxFor(model => model.TargetValue, new { @class = "box" })
                    </td>
                  </tr>
                  <tr>
                    <th>已经筹集金额</th>
                    <td>
                        @Html.TextBoxFor(model => model.CurrentValue, new { @class = "box" })
                    </td>
                  </tr>
                  <tr>
                    <th>修改LOGO</th>
                    <td>
                        <input type="file" id="p_file" name="Logo" />
                    </td>
                  </tr>
                  <tr>
                    <th></th>
                    <td>
                        <input type="button" title="取消" value="<< 返回" id="GoBackList" onclick="history.go(-1)" />
                        <input type="submit" value="保存 >>" class="btn" />
                    </td>
                  </tr>
               </tbody>
            </table>
        }
        <div style="clear: both;"></div>
    </div>
</div>

<script type="text/javascript">
    CKEDITOR.replace('Content');
</script>
